package com.mars.wx.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mars.common.utils.date.DateUtil;
import com.mars.manager.user.service.UserService;
import com.mars.web.common.support.BaseController;

@RestController
@RequestMapping(value="/user")
public class UserController extends BaseController{
	
	@Autowired
	private UserService service ;

	@GetMapping(value="/get/{id}")
	public Object getUser(@PathVariable Long id) {
		return setResponseResultOk(this.service.selectById(id)) ;
	}
	
	@GetMapping(value="/list")
	public Object list() {
		System.out.println(DateUtil.getCurrentDateTimeString());
		return setResponseResultOk(this.service.selectPage(getPageParam(), null)) ;
	}
	
}
